<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>常用内置对象</title>
</head>
<body>

</body>
<script>

    var dt = new Date();
   // document.write(dt);
    //document.write(dt.getFullYear());
      //document.write(dt.getMonth()+1);
/*     document.write(dt.getDate());
     document.write(dt.getDay()); // 星期几*/


    setInterval(function () {

        var dt2 = new Date();
        var hour = dt2.getHours();
        var min = dt2.getMinutes();
        var second = dt2.getSeconds();
        var result = hour+':'+min + ':'+ second;
        document.write(result);
        document.write('<br/>');

    },1000)




</script>
</html>